/** \file construct.h
 *
 * Opcode construction functions
 *
 * (c) 11/2004 Martin Strubel <hackfin@section5.ch>
 *
 * $Id: construct.h 31 2005-06-08 03:02:18Z philwil $
 *
 */
#ifndef _BFCONSTRUCT_H
#define _BFCONSTRUCT_H

#define LDST_32 0
#define LDST_16 1
#define LDST_8  2

#define LDST_READ 0
#define LDST_WRITE 1

#define OPCODE32 unsigned long


OPCODE32
cons_ldimm(int regno, int high, unsigned long addr);

OPCODE32
cons_ldstidxi(int ptr, int data, long offset, int size, int write);

OPCODE32
cons_ldst(int ptr, int data, int size, int write);

OPCODE32
cons_regmv(int dst, int src);

#define cons_ldidxi(ptr, data, offset, size)  \
	cons_ldstidxi(ptr, data, offset, size, 0)
#define cons_stidxi(ptr, data, offset, size)  \
	cons_ldstidxi(ptr, data, offset, size, 1)

#endif
